#include <memory>
#include <ctime>
#include <sys/time.h>
#include "SelectServer.hpp"

static void get_time()
{
    std::cout << (std::size_t)time(nullptr) << std::endl;

    struct timeval timeout;
    // struct timezone
    // {
    //     int tz_minuteswest; /* minutes west of Greenwich */
    //     int tz_dsttime;     /* type of DST correction */
    // };
    gettimeofday(&timeout, nullptr);

    std::cout << timeout.tv_sec << ":" << timeout.tv_usec << std::endl;
}

int main()
{
    //get_time();

    std::unique_ptr<SelectServer> ss(new SelectServer(8080));

    ss->Start();

    return 0;
}
